package view;

import java.awt.GridLayout;
import model.Entity;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.ImageIcon;

@SuppressWarnings("serial")
class AvatarViewer extends JPanel
{
	public AvatarViewer(Entity e)
	{
		setLayout(new GridLayout(2,1));
		ImageIcon playerPic = new ImageIcon(RepresentationFactory.getInstance().get(e).getSimpleImage());
		JLabel avatarName = new JLabel(e.getName(),JLabel.CENTER);
		JLabel avatarPic = new JLabel(playerPic);
		//JLabel avatarOcc = new JLabel(e.getOccupation(),JLabel.CENTER);
		add(avatarPic);
		add(avatarName);
	}
}